include_directories(${CMAKE_SOURCE_DIR}/lib ${CMAKE_SOURCE_DIR}/utility
    ${OPENGL_INCLUDE_DIR})

# It is problematic under Linux! Will cause segfaults on simspark exit.
if (WIN32 OR APPLE)
   set(spark_libs kerosin oxygen salt zeitgeist)
endif (WIN32 OR APPLE)
if (APPLE AND USE_COREFOUNDATION)
      set(spark_libs ${spark_libs} /System/Library/Frameworks/CoreFoundation.framework)
endif (APPLE AND USE_COREFOUNDATION) 

add_subdirectory(accelerometer)
add_subdirectory(agentsynceffector)
add_subdirectory(collisionperceptor)
add_subdirectory(filesystemstd)
add_subdirectory(filesystemzip)
add_subdirectory(forceeffector)
add_subdirectory(gyrorateperceptor)
add_subdirectory(inputsdl)
add_subdirectory(inputqt)
add_subdirectory(inputwx)
add_subdirectory(objimporter)
add_subdirectory(odeimps)
add_subdirectory(openglsyssdl)
add_subdirectory(openglsysqt)
add_subdirectory(openglsyswx)
add_subdirectory(perfectvisionperceptor)
add_subdirectory(rosimporter)
add_subdirectory(rubysceneimporter)
add_subdirectory(sexpparser)
add_subdirectory(sparkmonitor)
add_subdirectory(sparkagent)
add_subdirectory(sceneeffector)
add_subdirectory(soundsystemfmod)
add_subdirectory(timersystemboost)
add_subdirectory(timersystemsdl)
if (APPLE)
   if (DEVEL)
      add_subdirectory(imageperceptor)
   endif (DEVEL)
else (APPLE)
   add_subdirectory(imageperceptor)
endif (APPLE)
